﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Page_Test" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>


    <link href="../Com/layui/css/layui.css" rel="stylesheet" />
    <link href="../Com/formValidator/css/validationEngine.jquery.css" rel="stylesheet" />
    <link href="../Com/formValidator/css/template.css" rel="stylesheet" />
    <script src="../JS/jquery-1.4.2.min.js"></script>
    <script src="../Com/formValidator/js/jquery.validationEngine.js"></script>
    <script src="../Com/formValidator/js/languages/jquery.validationEngine-zh_CN.js"></script>
    <script src="../Com/layui/layui.js"></script>
    <script src="../JS/jquery.form.js"></script>

</head>
<body>
    <div class="layui-form-pane" style="margin-top: 15px;">
        <div class="layui-form-item">
            <label class="layui-form-label" style="padding: 1px 15px">范围选择</label>
            <div class="layui-input-inline">
                <input class="inline laydate-icon" style="padding-left: 10px;" placeholder="开始日" id="LAY_demorange_s" />
            </div>
            <div class="layui-input-inline">
                <input class="inline laydate-icon" style="padding-left: 10px;" placeholder="截止日" id="LAY_demorange_e" />
            </div>
        </div>
    </div>

    <script>
        layui.use('laydate', function () {

            var laydate = layui.laydate;

            var start = {
                min: '2000-01-01 00:00:00'
              , max: '2099-06-16 23:59:59'
              , istoday: true
                //, istime: false
              , festival: true
              , choose: function (datas) {
                  end.min = datas; //开始日选好后，重置结束日的最小日期
                  end.start = datas //将结束日的初始值设定为开始日
              }

            };

            var end = {
                min: '2000-01-01 00:00:00'
              , max: '2099-06-16 23:59:59'
              , istoday: true
                , festival: true
              , choose: function (datas) {
                  start.max = datas; //结束日选好后，重置开始日的最大日期
              }
            };
            document.getElementById('LAY_demorange_s').onclick = function () {
                start.elem = this;
                laydate(start);

            }
            document.getElementById('LAY_demorange_e').onclick = function () {
                end.elem = this
                laydate(end);
            }

        });
    </script>

</body>
</html>
